# Generate a sample from a binomial distribution, maybe the number of sites
# where a species was detected:
n <- 10 # number of trials (sites visited)
( y <- rbinom(1, n, 0.75) ) # number of successes (sites where species detected)
Bbinomial(y, n) # with uniform prior
Bbinomial(y, n, priors=list(mode=0.4, conc=5)) # with informative prior
Run the code above in your browser using DataLab